import React from 'react';
import {Card,Tag} from 'antd';

export default function Details(props) {

    const {loading,data} = props;

    const {title,author,content,create_at} = data;
     return (

        <>
            <Card 
                bordered
                loading={loading}
                type='inner'
                title={

                    <>
                        <Tag color='green'>分享</Tag>
                        {title}

                    </>
                }
            >
                <div>
                    <script>
                        alert('我是大侠')
                    </script>
                </div>
                {/* dangerourlySetsInnerHtml 是 React 提供的一个将 html 标签安全的插入页面的属性 */}
                <div dangerouslySetInnerHTML={{__html:content}} ></div>
            </Card>
        </>
    )
}